@echo off

if "%2"=="" goto :usage

call config.bat %1 %2 
@echo.
@echo.

if not "%1"=="tag" (

	rem %JSDK%\bin\java -jar %RELEASE_PATH%\%PRJ_NAME%_RELEASE.jar
	%JSDK%\bin\java.exe -cp %GL_EMULATOR% -Dmicroedition.locale=en -Dvk_pound=VK_DIVIDE  -Dvk_fire=VK_ENTER  -Dvk_star=VK_MULTIPLY  -Dvk_rsk=VK_F2  -Dvk_lsk=VK_F1   emulator.GLEmulator  -device "sony-ericsson s700i" -jar "%RELEASE_PATH%\%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jar" -dSCREEN_HEIGHT=%GLEMU_SCR_H% -dSCREEN_WIDTH=%GLEMU_SCR_W%
) else (
	if not exist "tags\%2" (
	@echo ::::::: ERROR! TAG DOESN'T EXISTS ::::::::
	) else (
		rem %JSDK%\bin\java -jar %TAGS_PATH%\%1\release\%PRJ_NAME%_RELEASE.jar
		%JSDK%\bin\java.exe -cp %GL_EMULATOR% -Dmicroedition.locale=en -Dvk_pound=VK_DIVIDE  -Dvk_fire=VK_ENTER  -Dvk_star=VK_MULTIPLY  -Dvk_rsk=VK_F2  -Dvk_lsk=VK_F1   emulator.GLEmulator  -device "sony-ericsson s700i" -jar "%RELEASE_PATH%\%PRJ_NAME%_RELEASE_%MIDLET_VERSION%.jar" -dSCREEN_HEIGHT=%GLEMU_SCR_H% -dSCREEN_WIDTH=%GLEMU_SCR_W%
	)
)

@echo.
@echo.

goto :eof

:usage
@echo.
@echo      USAGE:
@echo                 run.bat [scr_w] [scr_h]
@echo.
